<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 微信回复
 */
class CreateWechatReply extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_reply', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('wechat_keyword_id')->comment('关键词主键ID');
            $table->string('replyType')->comment('回复类型 text,image,mpnews');
            $table->integer('wechat_text_id')->comment('回复文本主键ID');
            $table->integer('wechat_image_id')->comment('回复图片主键ID');
            $table->integer('wechat_mpnews_id')->comment('回复图文消息主键ID');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('wechat_reply');
    }
}
